package top.wintp.offlinedataanalysis.anlyser.domain;

import java.io.Serializable;
import java.util.Date;

/**
 * stats_order
 * @author 
 */
public class StatsOrder extends StatsOrderKey implements Serializable {
    /**
     * 订单个数
     */
    private Integer orders;

    /**
     * 成功支付的订单个数
     */
    private Integer successOrders;

    /**
     * 退款订单个数
     */
    private Integer refundOrders;

    /**
     * 订单金额
     */
    private Integer orderAmount;

    /**
     * 收入金额，也就是成功支付过的金额
     */
    private Integer revenueAmount;

    /**
     * 退款金额
     */
    private Integer refundAmount;

    /**
     * 迄今为止，总的订单交易额
     */
    private Integer totalRevenueAmount;

    /**
     * 迄今为止，总的退款金额
     */
    private Integer totalRefundAmount;

    private Date created;

    private static final long serialVersionUID = 1L;

    public Integer getOrders() {
        return orders;
    }

    public void setOrders(Integer orders) {
        this.orders = orders;
    }

    public Integer getSuccessOrders() {
        return successOrders;
    }

    public void setSuccessOrders(Integer successOrders) {
        this.successOrders = successOrders;
    }

    public Integer getRefundOrders() {
        return refundOrders;
    }

    public void setRefundOrders(Integer refundOrders) {
        this.refundOrders = refundOrders;
    }

    public Integer getOrderAmount() {
        return orderAmount;
    }

    public void setOrderAmount(Integer orderAmount) {
        this.orderAmount = orderAmount;
    }

    public Integer getRevenueAmount() {
        return revenueAmount;
    }

    public void setRevenueAmount(Integer revenueAmount) {
        this.revenueAmount = revenueAmount;
    }

    public Integer getRefundAmount() {
        return refundAmount;
    }

    public void setRefundAmount(Integer refundAmount) {
        this.refundAmount = refundAmount;
    }

    public Integer getTotalRevenueAmount() {
        return totalRevenueAmount;
    }

    public void setTotalRevenueAmount(Integer totalRevenueAmount) {
        this.totalRevenueAmount = totalRevenueAmount;
    }

    public Integer getTotalRefundAmount() {
        return totalRefundAmount;
    }

    public void setTotalRefundAmount(Integer totalRefundAmount) {
        this.totalRefundAmount = totalRefundAmount;
    }

    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        StatsOrder other = (StatsOrder) that;
        return (this.getPlatformDimensionId() == null ? other.getPlatformDimensionId() == null : this.getPlatformDimensionId().equals(other.getPlatformDimensionId()))
            && (this.getDateDimensionId() == null ? other.getDateDimensionId() == null : this.getDateDimensionId().equals(other.getDateDimensionId()))
            && (this.getCurrencyTypeDimensionId() == null ? other.getCurrencyTypeDimensionId() == null : this.getCurrencyTypeDimensionId().equals(other.getCurrencyTypeDimensionId()))
            && (this.getPaymentTypeDimensionId() == null ? other.getPaymentTypeDimensionId() == null : this.getPaymentTypeDimensionId().equals(other.getPaymentTypeDimensionId()))
            && (this.getOrders() == null ? other.getOrders() == null : this.getOrders().equals(other.getOrders()))
            && (this.getSuccessOrders() == null ? other.getSuccessOrders() == null : this.getSuccessOrders().equals(other.getSuccessOrders()))
            && (this.getRefundOrders() == null ? other.getRefundOrders() == null : this.getRefundOrders().equals(other.getRefundOrders()))
            && (this.getOrderAmount() == null ? other.getOrderAmount() == null : this.getOrderAmount().equals(other.getOrderAmount()))
            && (this.getRevenueAmount() == null ? other.getRevenueAmount() == null : this.getRevenueAmount().equals(other.getRevenueAmount()))
            && (this.getRefundAmount() == null ? other.getRefundAmount() == null : this.getRefundAmount().equals(other.getRefundAmount()))
            && (this.getTotalRevenueAmount() == null ? other.getTotalRevenueAmount() == null : this.getTotalRevenueAmount().equals(other.getTotalRevenueAmount()))
            && (this.getTotalRefundAmount() == null ? other.getTotalRefundAmount() == null : this.getTotalRefundAmount().equals(other.getTotalRefundAmount()))
            && (this.getCreated() == null ? other.getCreated() == null : this.getCreated().equals(other.getCreated()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getPlatformDimensionId() == null) ? 0 : getPlatformDimensionId().hashCode());
        result = prime * result + ((getDateDimensionId() == null) ? 0 : getDateDimensionId().hashCode());
        result = prime * result + ((getCurrencyTypeDimensionId() == null) ? 0 : getCurrencyTypeDimensionId().hashCode());
        result = prime * result + ((getPaymentTypeDimensionId() == null) ? 0 : getPaymentTypeDimensionId().hashCode());
        result = prime * result + ((getOrders() == null) ? 0 : getOrders().hashCode());
        result = prime * result + ((getSuccessOrders() == null) ? 0 : getSuccessOrders().hashCode());
        result = prime * result + ((getRefundOrders() == null) ? 0 : getRefundOrders().hashCode());
        result = prime * result + ((getOrderAmount() == null) ? 0 : getOrderAmount().hashCode());
        result = prime * result + ((getRevenueAmount() == null) ? 0 : getRevenueAmount().hashCode());
        result = prime * result + ((getRefundAmount() == null) ? 0 : getRefundAmount().hashCode());
        result = prime * result + ((getTotalRevenueAmount() == null) ? 0 : getTotalRevenueAmount().hashCode());
        result = prime * result + ((getTotalRefundAmount() == null) ? 0 : getTotalRefundAmount().hashCode());
        result = prime * result + ((getCreated() == null) ? 0 : getCreated().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", orders=").append(orders);
        sb.append(", successOrders=").append(successOrders);
        sb.append(", refundOrders=").append(refundOrders);
        sb.append(", orderAmount=").append(orderAmount);
        sb.append(", revenueAmount=").append(revenueAmount);
        sb.append(", refundAmount=").append(refundAmount);
        sb.append(", totalRevenueAmount=").append(totalRevenueAmount);
        sb.append(", totalRefundAmount=").append(totalRefundAmount);
        sb.append(", created=").append(created);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}